package main

import "fmt"

var channel = make(chan int)

// 写端: channel <- "hehe"  写端写数据,读端不再读  ==>阻塞
// 读端: str := <- channel  读端读数据,同时写端不再写  ==>阻塞

func test1() {
	fmt.Println("hello")
	channel <- 8
}

func test2() {
	<-channel
	fmt.Println("world")
}

func main() {
	go test1()
	//go test2()

	for {

	}
}
